<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>react页</title>
    <script src="../resources/react.development.js"></script>
    <script src="../resources/react-dom.development.js"></script>
    <script src="../resources/babel.min.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background: rgba(0, 255, 255, 0.7);
        }
        .titleBox{
            width: 100vw;
            height: 30px;
            display: flex;
            border-bottom: 1px solid rgba(200, 200, 200, 0.5);
        }
        .titleBox #pinnedImage{
            float: right;
            width: 50px;
            height: 100%;
            transition: all 0.5s;
        }
        .titleBox .dailog{
            width: 300px;
            height: 100%;
            -webkit-app-region: drag;
        }
        .titleBox img:nth-child(1){
            user-select: none;
            cursor: pointer;
        }

        .project1Box{
            width: 100vw;
            height: 30vh;
            
        }
        #project1{
            width: 90%;
            height: 90%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .project1_all{
            width: 100%;
            height: 100%;
            border-radius: 10px;
            background-color: rgba(255, 255, 255, 0.7);
        }
    </style>
</head>
<body>
    <div class="">
        <div class="titleBox">
            <img src="../images/reuturnWhit.svg" alt="" id="pinnedImage" />
            <img src="../images/logo/learn_react_logo_white.svg" alt="">
            <div class="dailog"></div>
        </div>
        <div class="project1Box">
            <div id="project1"></div>
            <div></div>
        </div>
    </div>
</body>
<script src="./reactJs.js"></script>
<script type="text/babel">
function Project1(){
    const [num,setNum] = React.useState(0)
    return (<>
        <div className="project1_all">
            <p>{num}</p>
            <button onClick={()=>setNum(num+1)}>+1</button>
        </div>
    </>)
}

const project1 = ReactDOM.createRoot(document.getElementById('project1'));
project1.render(<Project1 />)
</script>
</html>